import Vue from 'vue'
import Cookies from 'js-cookie'
import 'normalize.css/normalize.css' //

import Element from 'element-ui'
import './assets/css/override-element-ui.css'
import './assets/styles/element-variables.scss'
import './assets/styles/index.scss' // global css
import '@/assets/styles/syyo.scss' // ruoyi css
import 'default-passive-events' // Chrome浏览器利用该特性来优化页面的滑动性能

import App from './App'
import store from './store'
import router from './router/routers'
import './assets/icons' // icon
import './router/index'

import permission from './directive/permission'
import { hasTable, sexFormat, downloadGeneratorZip, exports } from '@/utils/syyo'

import TreeTable from 'vue-table-with-tree-grid'
import addNode from '@/components/Flow/addNode'
import nodeWrap from '@/components/Flow/nodeWrap'
import RightBar from '@/components/RightBar'
// import Pagination from "@/components/Pagination";

// 自定义表格工具扩展

Vue.component('addNode', addNode)
Vue.component('nodeWrap', nodeWrap)
Vue.component('right-bar', RightBar)
Vue.component('tree-table', TreeTable)

// 过滤器
Vue.filter('sexFormat', sexFormat)
// 全局方法挂载
Vue.prototype.downloadGeneratorZip = downloadGeneratorZip
Vue.prototype.exports = exports
Vue.prototype.hasTable = hasTable

Vue.use(permission)
Vue.use(Element, {
  size: Cookies.get('size') || 'medium' // set element-ui default size
})

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
